<?php
class Validator{

    function validAlfanumeric($alfaNumeric){
        if(!preg_match('/^[a-zA-Z0-9]+$/',$alfaNumeric)){
            return true;
        }else{
            return false;
        }
    }

    function validSpace($space){
        if(!preg_match('/\s/',$space)){
            return true;
        }else{
            return false;
        }
    }

    function validEmail($email){
        if(preg_match("/^\S+@\S+\.\S+$/", $email)){
            return true;
        }else{
            return false;
        }
    }

    function validPassword($password){
        if(preg_match("/[A-Za-z0-9!#$]/", $password)){
           return true;
        }else{
            return false;
        }
    }
    function validNumbers($number){
        if(preg_match("/[0-9]/",$number)){
            return true;
        }
        else{
            return false;
        }
    }
}

?>